package com.backstage.controller;

import com.backstage.common.page.Page;
import com.backstage.entity.Log;
import com.backstage.entity.Menu;
import com.backstage.service.LogService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @Author:阮雪峰
 * @Date：2017/8/5 9:56
 * @pagekage: com.backstage.controller
 * @project: authority
 */
@RequestMapping("/log")
@Controller
public class LogController {

    @Resource(name = "logService")
    private LogService logService;

    @RequiresPermissions("sys:log:list")
    @RequestMapping(value = "/queryByPage", method = RequestMethod.POST)
    @ResponseBody
    public Page<Log> queryByPage(Page<Log> page, Log log){
        logService.logByPage(page, log);
        return page;
    }
}
